# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=cmake-extras-git
_pkgname=cmake-extras
pkgver=r241.820b661
pkgrel=2
pkgdesc='A collection of add-ons for the CMake build tool'
url='https://github.com/ubports/cmake-extras'
arch=(any)
license=(GPL3)
conflicts=(cmake-extras)
provides=(cmake-extras)
depends=(python)
makedepends=(git cmake)
source=('git+https://github.com/ubports/cmake-extras.git'
        'Gtest.patch')
sha256sums=('SKIP'
            '84880029cf774b41e6f61f4977bdc3a36621a571087d272a44aa3776a4f883e0')

prepare() {
  cd ${_pkgname}
  git checkout master
  patch -Np1 -i "${srcdir}/Gtest.patch"
}
            
pkgver() {
  cd ${_pkgname}
  echo "r$(git rev-list --count HEAD).$(git describe --always)"
}

build() {
    cd ${_pkgname}
    cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
    make
}

package() {
    cd ${_pkgname}
    make DESTDIR="${pkgdir}/" install
}
# vim:set ts=2 sw=2 et:
